package com.ys.openapi.process;

import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.Map;

/**
 * 提交或者驳回时流程参数
 */
public class Params {
    private String id;
    private String type;// 类型 1：外销 2：备货
    private String modelType;// 模式类型 1：正常模式 2：备货模式 3：海外模式
    private String exportFee;// 外销费用 1：有外销费用
    private String buyFee;// 采购费用 1：有采购费用
    private String transFee;// 出运费用 1：有出运费用
    private String delExpFee;// 外销费用删除 1：删除 0：未删除
    private String delBuyFee;// 采购费用删除 1：删除 0：未删除
    private String delTranFee;// 出运费用删除 1：删除 0：未删除
    private String excFee;// 结汇费用 1：有结汇费用
    private String delExcFee;//  结汇费用删除 1：删除 0：未删除
    private String custom;// 报关 1：报关刘超
    private String  delCustom;// 删除报关 1：删除 0：未删除
    private String collect;// 收款 1：有收款比例
    private String deposit;// 定金 1：有定金比例
    private String invoice;// 开票 1：开票
    private String drawback;// 退税 1：退税
    private String clear;// 清关 1：清关
    private String delDeposit;// 定金删除 1：删除 0：为删除

    public Map<String,String> toMap(Params params)throws Exception{
        Map<String,String> map=new HashMap<>();
        Field[] declaredFields = params.getClass().getDeclaredFields();
        for (Field field:declaredFields ) {
            field.setAccessible(true);
            map.put(field.getName(),""+field.get(params));
        }
        return map;
    }

    public static void main(String[] args)throws Exception{
        Params params=new Params();
        params.setId("id");
        params.toMap(params);
    }
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getModelType() {
        return modelType;
    }

    public void setModelType(String modelType) {
        this.modelType = modelType;
    }

    public String getExportFee() {
        return exportFee;
    }

    public void setExportFee(String exportFee) {
        this.exportFee = exportFee;
    }

    public String getBuyFee() {
        return buyFee;
    }

    public void setBuyFee(String buyFee) {
        this.buyFee = buyFee;
    }

    public String getTransFee() {
        return transFee;
    }

    public void setTransFee(String transFee) {
        this.transFee = transFee;
    }

    public String getDelExpFee() {
        return delExpFee;
    }

    public void setDelExpFee(String delExpFee) {
        this.delExpFee = delExpFee;
    }

    public String getDelBuyFee() {
        return delBuyFee;
    }

    public void setDelBuyFee(String delBuyFee) {
        this.delBuyFee = delBuyFee;
    }

    public String getDelTranFee() {
        return delTranFee;
    }

    public void setDelTranFee(String delTranFee) {
        this.delTranFee = delTranFee;
    }

    public String getExcFee() {
        return excFee;
    }

    public void setExcFee(String excFee) {
        this.excFee = excFee;
    }

    public String getDelExcFee() {
        return delExcFee;
    }

    public void setDelExcFee(String delExcFee) {
        this.delExcFee = delExcFee;
    }

    public String getCustom() {
        return custom;
    }

    public void setCustom(String custom) {
        this.custom = custom;
    }

    public String getDelCustom() {
        return delCustom;
    }

    public void setDelCustom(String delCustom) {
        this.delCustom = delCustom;
    }

    public String getCollect() {
        return collect;
    }

    public void setCollect(String collect) {
        this.collect = collect;
    }

    public String getDeposit() {
        return deposit;
    }

    public void setDeposit(String deposit) {
        this.deposit = deposit;
    }

    public String getInvoice() {
        return invoice;
    }

    public void setInvoice(String invoice) {
        this.invoice = invoice;
    }

    public String getDrawback() {
        return drawback;
    }

    public void setDrawback(String drawback) {
        this.drawback = drawback;
    }

    public String getClear() {
        return clear;
    }

    public void setClear(String clear) {
        this.clear = clear;
    }

    public String getDelDeposit() {
        return delDeposit;
    }

    public void setDelDeposit(String delDeposit) {
        this.delDeposit = delDeposit;
    }
}
